﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;



namespace WF_Array
{
    
   
    internal static class Program
    {   //程序静态数组
        public static List<int> nums= new List<int>();
        public static int getMax()
        {
            int max=nums[0];
            foreach (int i in nums)
            {
                if(i > max)
                    max = i;
            }
            return max;
        }

        public static int getMin()
        {
            int min = nums[0];
               foreach(int i in nums)
            {
                if (i < min)  
                    min = i;
            }
               return min;
        }

        public static int getAverage()
        {
            int sum = 0;
            foreach(int i in nums)
            {
                sum += i;
            }
            return sum/nums.Count;
        }

        public static int getSum()
        {
            int sum = 0;
            foreach (int i in nums)
            {
                sum += i;
            }
            return sum;
        }

        public static string showNums()
        {
            string st=string.Empty;
            foreach(int i in nums)
            {
                st =st+i.ToString()+" ";
            }
            return st;
        }
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {   
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
          
        }
    }
}
